<%@ page language="java" pageEncoding="utf-8"%>
<%@page import="java.util.Date"%>
<%
	String path = request.getContextPath();
	int i = path.lastIndexOf("/");
	String ipAndPort = path.substring(0,i);
	request.setAttribute("appPath", path);
	request.setAttribute("ipAndPort", ipAndPort);
	request.setAttribute("appJsPath", path + "/js");
	String easyUITheme = "cupertino";
	easyUITheme = "default";
	request.setAttribute("easyUITheme", easyUITheme);
	request.setAttribute("$version",System.currentTimeMillis());
	request.setAttribute("appStaticsPath", path+"/statics"); // 本应用资源
	request.setAttribute("staticsPath", "/statics"); // 静态资源服务器
	
	Date systemDate = new Date(); 
	long systemTime = systemDate.getTime();
	pageContext.setAttribute("sessionId", session.getId());

%>

<script type="text/javascript">
	window.sessionId = "${sessionId}";
	window.$appPath = "${appPath}";
	window.$ipAndPort = "${ipAndPort}";
	window.$staticsPath = "${staticsPath}";
	window.$appStaticsPath = "${appStaticsPath}";
	
	window.console = window.console || {}; 
	try {
		if (!console.log) {
			console.log = function () {};
		}
	} catch(e) {
	}
	
	var Sys = window.Sys || {};
	Sys.systemTime = <%=systemTime%>;
	Sys.systemDate = new Date(Sys.systemTime);
	
</script>